home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: Camelot / Camelot 105 (1991-02)(Swedish User Group of Amiga)(SE)(PD)[WB].zip / Camelot 105 (1991-02)(Swedish User Group of Amiga)(SE)(PD)[WB].adf / AmigaUUCP / uucico / uuhosts.c < prev    next >
C/C++ Source or Header  |  1990-10-08  |  822b  |  44 lines

  1.  
  2. /*
  3.  * UUHOSTS  -- List all UUCP sites connected to our system
  4.  *
  5.  *  $Header: Beta:src/uucp/src/uucico/RCS/uuhosts.c,v 1.1 90/02/02 11:55:57 dillon Exp Locker: dillon $
  6.  *
  7.  *
  8.  * Usage: UUHOSTS
  9.  *
  10.  * Copyright 1988 by William Loftus.  All rights reserved.
  11.  *
  12.  * ARPA: wpl@prc.unisys.com
  13.  * UUCP: wpl@burdvax.UUCP
  14.  * USMAIL: Unisys/Paoli Research Center;PO BOX 517;Paoli, PA 19301-0517
  15.  *
  16.  */
  17.  
  18. #include <stdio.h>
  19. #include "version.h"
  20. #include "protos.h"
  21.  
  22. IDENT(".02");
  23.  
  24. void
  25. main()
  26. {
  27.     char buf[256];
  28.     FILE *fd;
  29.  
  30.     if (!(fd = fopen(MakeConfigPath(UULIB, "L.sys"), "r"))) {
  31.     printf("Couldn't open L.sys file\n");
  32.     exit(1);
  33.     }
  34.  
  35.     while (fgets(buf, sizeof buf, fd)) {
  36.     if (buf[0] == '#' || buf[0] == '\n')
  37.         continue;
  38.     buf[(int)strchr(buf,' ') - (int)buf] = '\0';
  39.     printf("%s\n", buf);
  40.     }
  41.     fclose(fd);
  42. }
  43.  
  44.